<?php include show_tpl('public_uheader.htm'); ?>

<div style="width:100%; height:20px; background:#E9ECF3;"></div>

<?php include show_tpl('public_usider.htm'); ?>

<div id="page-wrapper" class="gray-bg">

	<div class="row wrapper wrapper-content">
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">
							<em class="fa fa-list"></em>
							基本资料
						</div>
					</div>
					<div class="panel-body">
						<div class="content-box">
							<form class="form-ajax form-horizontal" id="form" action="<?php echo url('user-info'); ?>" method="post">
								<div class="form-group">
									<label class="col-md-2 control-label">注册邮箱： </label>
									<div class="col-lg-6">
										<div class="input-group">
											<input type="text" class="form-control" value="<?php echo $user['email'];?>" disabled="">
											<span class="input-group-addon">已验证</span>	
										</div>  
									</div>
								</div>
								<div class="form-group" >
									<label class="col-md-2 control-label">手机号码：</label>
									<div class="col-lg-6">
										<input type="text" name="phone" readonly="readonly" class="form-control" value="<?php echo $user['info_mobile'];?>">
									</div>
								</div>
								<div class="form-group" >
									<label class="col-md-2 control-label">选择通道方式：</label>
									<div class="col-lg-6">
										<select  class="form-control" name="is_mode">
											<option value="1" "<?php echo $user['is_mode']==1?'selected':'';?>" >随机执行</option>
											<option value="2" <?php echo $user['is_mode']==2?'selected':'';?>>顺序执行</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">联系QQ：</label>
									<div class="col-md-6">
										<input type="text" name="qq" class="form-control" value="<?php echo $user['info_qq'];?>">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">真实姓名：</label>
									<div class="col-md-6">
										<input type="text" name="realname" class="form-control" value="<?php echo $user['info_name'];?>">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">身份证号：</label>
									<div class="col-md-6">
										<input type="text" name="idcard" class="form-control" value="<?php echo $user['info_id']; ?>">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">网站名称：</label>
									<div class="col-md-6">
										<input type="text" name="sitename" class="form-control" value="<?php echo $user['info_sitename'];?>">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">站点地址：</label>
									<div class="col-md-6">
										<input type="text" name="siteurl" class="form-control" value="<?php echo $user['info_sitelink'];?>">
									</div>
								</div>
								<div class="form-group">
									<div class="col-md-offset-2 col-md-6">
										<button type="submit" class="btn btn-success" id="submit">
											&nbsp;<i class="fa fa-check-square-o"></i>&nbsp;
											保存设置&nbsp;
										</button>
									</div>
								</div>
							</form>
						</div>
					</div>  
				</div>
			</div>
		</div>
	</div>
</div>

<?php include show_tpl('public_ufooter.htm'); ?>

<script>
	$('#submit').click(function(){
		var $this = $('#submit');
		$this.attr('disabled', '1');
		var postdata = $('#form').serialize();
		$.post($('#form').attr('action'), postdata, function(message){
			alert(message.message);
			if(message.code==1) window.location.reload();
			$this.attr('disabled', false);
		}, 'json');
		return false;
	});
</script>